<template>
  <v-dialog v-model="currentVal" max-width="290" persistent>
    <v-card>
      <v-card-title class="justify-center">{{message}}</v-card-title>
      <v-divider></v-divider>
      <v-card-actions>
        <v-btn style="width: 45%" color="green darken-1" text @click="currentVal = false"> 取消</v-btn>
        <v-divider vertical></v-divider>
        <v-btn style="width: 45%" color="green darken-1" text @click="currentVal = false"> 确定</v-btn>
      </v-card-actions>
    </v-card>
  </v-dialog>
</template>

<script>
    /**
     * 确认弹出框
     * @author Canaan
     * @date 2019/8/22 15:29.
     */
    export default {
        name: 'confirm',
        mounted() {

        },
        components: {},
        props: {
            message: {
                type: String,
                default: ''
            },
            value: {
                type: Boolean,
                default: false
            }
        },
        data() {
            return {
                currentVal: this.value
            }
        },
        computed: {},
        methods: {},
        watch: {
            currentVal(val) {
                this.$emit('input', val);
            },
            value(val) {
                this.currentVal = val;
            }
        },
        filters: {},
        beforeDestroy() {

        }
    }
</script>

<style scoped>

</style>
